
#ifndef MCU_AbstractDigitron_H
#define MCU_AbstractDigitron_H


//Nixie Tube of abstract
#define Tube_Length 24
typedef enum
{
    Tube_A = 0x01,
    Tube_B = 0x02,
    Tube_C = 0x04,
    Tube_D = 0x08,
    Tube_E = 0x10,
    Tube_F = 0x20,
    Tube_G = 0x40,
    Tube_H = 0x80,
}Tube_Abstract_E;
typedef enum
{
    Tube_0 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_E | Tube_F),
    Tube_1 = (Tube_B | Tube_C),
    Tube_2 = (Tube_A | Tube_B | Tube_D | Tube_E | Tube_G),
    Tube_3 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_G),
    Tube_4 = (Tube_B | Tube_C | Tube_F | Tube_G),
    Tube_5 = (Tube_A | Tube_C | Tube_D | Tube_F | Tube_G),
    Tube_6 = (Tube_A | Tube_C | Tube_D | Tube_E | Tube_F | Tube_G),
    Tube_7 = (Tube_A | Tube_B | Tube_C),
    Tube_8 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_E | Tube_F | Tube_G),
    Tube_9 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_F | Tube_G),
    Tube_10 = 0, //空显示
    Tube_11 = Tube_G, //-
    Tube_12 = (Tube_A | Tube_E | Tube_F | Tube_G), //F
    Tube_13 = (Tube_A | Tube_D | Tube_E | Tube_F | Tube_G), //E
    Tube_14 = (Tube_E | Tube_G), //r
    Tube_15 = (Tube_C | Tube_E | Tube_G), //n
    Tube_16 = (Tube_C | Tube_D | Tube_E | Tube_G), //o
    Tube_17 = (Tube_A | Tube_B | Tube_E | Tube_F | Tube_G), //p
    Tube_18 = (Tube_A | Tube_F | Tube_G | Tube_C | Tube_D), //S
    Tube_19 = (Tube_F | Tube_E | Tube_G | Tube_B | Tube_C), //H
    Tube_20 = (Tube_F | Tube_E | Tube_D ), //L
    Tube_21 = (Tube_A | Tube_B | Tube_C | Tube_D | Tube_E | Tube_F), //O
    Tube_22 = (Tube_E), //i
    Tube_23 = (Tube_C | Tube_D | Tube_E), //u
}Tube_Encoder_E;
extern const Tube_Encoder_E Tube_Encoder[Tube_Length];

#define Tube_Inverse 1 //数码管数字反显,用于共阴,共阳区分
#define Tube_Encoder_Space 10 //空格
#define Tube_Encoder_Crossbar 11 //-
#define Tube_Encoder_F 12 //F
#define Tube_Encoder_E_Char 13 //E
#define Tube_Encoder_r 14 //r
#define Tube_Encoder_n 15 //n
#define Tube_Encoder_o 16 //o
#define Tube_Encoder_P 17 //P
#define Tube_Encoder_S 18 //S
#define Tube_Encoder_H 19 //H
#define Tube_Encoder_L 20 //L
#define Tube_Encoder_O 21 //O
#define Tube_Encoder_i 22 //i
#define Tube_Encoder_u 23 //u
#define Nixie_Num_Inverse 1 //1:数码段高电平显示,低电平隐藏; 0:数码段低电平显示,高电平隐藏

#endif
